





#ifndef _VIN_BITSTREAM_IO_H_
#define _VIN_BITSTREAM_IO_H_

#include "VinDefines.h"

class VinBitstreamIO
{
	public:
	
		// Default constructor.
		VinBitstreamIO (UInt8* stream);
		
		// Destructor.
		~VinBitstreamIO ();
		
		// Function to get one bit.
		UInt32 GetBit ();
		
		// Function to read 'n' bits.
		UInt32 GetBits (UInt32 bitCount);
		
		// Function to read Unsigned exponential golumb code.
		UInt32 GetUev ();
		
		// Function to get Signed exponential golumb code.
		UInt32 GetSev ();
		
		// Functions to get mapped exponential golumb code.
		UInt32 GetMev ();
		
	private:
	
        // The bitstream buffer.
		UInt8* bitstream;
		
        // The bit count.
		UInt32 bitCount;
};


#endif